import request from '@/utils/request'

/**
 * 获取-员工列表
 */
export const getUSerInfoAPI = (params) => {
  return request({
    url: '/sys/user',
    params
  })
}

/**
 * 删除功能
 */
export const deleteUSerInfoAPI = (id) => {
  return request({
    url: `/sys/user/${id}`,
    method: 'delete'
  })
}
/**
 *添加功能
 *
 */
export const ADDUSerInfoAPI = (data) => {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}
/**
 *
 * 批量-导入员工
 */
export const UpdataUSerInfoAPI = (data) => {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}

/**
 *
 * 修改-员工-基本信息
 */
export const AddUpdataUSerInfoAPI = (data) => {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data
  })
}

/**
 *分配-员工-角色
 */
export const ChangeUpdataUSerInfoAPI = (data) => {
  return request({
    url: '/sys/user/assignRoles',
    method: 'put',
    data
  })
}
